# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-wasm
_pkgname=wasm
pkgver=1.2
pkgrel=5
pkgdesc='WebAssembly decoder & disassembler.'
arch=('any')
url='https://pypi.org/project/wasm/#files'
license=('MIT')
depends=('python' 'python-setuptools')
makedepends=('python-setuptools')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('3778a36a49132b95b3d057749d3c443d36709951b4787a1e2006967c352ff83aaf4a1f71057a3be645be96eee2e87574d0a58fcdc0df2fe92ce72aafe4922fbd')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  find "$pkgdir" -type f -iname '*.pyc' -print -exec rm -f {} \;
}

